from django.conf.urls import url
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.decorators import api_view


@csrf_exempt
@api_view(['POST'])
def api_post(request):
    res = request.data
    return JsonResponse(res)

@csrf_exempt
@api_view(['GET'])
def api_get(request):
    res = request.data
    return JsonResponse(res)

@csrf_exempt
def req_post(request):
    res = request.data
    return JsonResponse(res)

@csrf_exempt
@api_view(['GET'])
def req_get(request):
    res = request.data
    return JsonResponse(res)

